import 'package:json_annotation/json_annotation.dart';

part 'pic_info_detail.g.dart';

@JsonSerializable()
class PicInfoDetail {
  @JsonKey(defaultValue: 0)
  final int Code;
  @JsonKey(defaultValue: null)
  final DataBeanAdd? Data;
  @JsonKey(defaultValue: '')
  final String Message;
  @JsonKey(defaultValue: '')
  final String RequestId;
  @JsonKey(defaultValue: false)
  final bool Success;

  PicInfoDetail({
    required this.Code,
    this.Data,
    required this.Message,
    required this.RequestId,
    required this.Success,
  });

  factory PicInfoDetail.fromJson(Map<String, dynamic> json) =>
      _$PicInfoDetailFromJson(json);

  Map<String, dynamic> toJson() => _$PicInfoDetailToJson(this);
}

@JsonSerializable()
class DataBeanAdd {
  final DataBean? data;

  DataBeanAdd({
    required this.data,
  });

  factory DataBeanAdd.fromJson(Map<String, dynamic> json) =>
      _$DataBeanAddFromJson(json);

  Map<String, dynamic> toJson() => _$DataBeanAddToJson(this);
}

@JsonSerializable()
class DataBean {
  @JsonKey(defaultValue: [])
  final List<String>? caption;

  DataBean({
    required this.caption,
  });

  factory DataBean.fromJson(Map<String, dynamic> json) =>
      _$DataBeanFromJson(json);

  Map<String, dynamic> toJson() => _$DataBeanToJson(this);
}

